<HTML><HEAD><TITLE>referenced_record(+DBRef, -Value)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Recorded Database</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>referenced_record(+DBRef, -Value)</H1>
Succeeds if Value is the Term recorded under the database reference DBRef.
<DL>
<DT><EM>DBRef</EM></DT>
<DD>A database reference.
</DD>
<DT><EM>Value</EM></DT>
<DD>Any Prolog term.
</DD>
</DL>
<H2>Description</H2>
   The database reference DBRef must refer to a term that has previously
   been recorded in the indexed database.  Database references can be
   obtained from the predicates recorda/3, recordz/3 and recorded/3.
   Value is unified with a copy of the recorded term.  Note that this
   is the case even if the original database entry has been removed since
   the database reference was obtained (logical update semantics).

<H3>Modes and Determinism</H3><UL>
<LI>referenced_record(+, -) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>DBRef is not instantiated.
<DT><EM>(5) type error </EM>
<DD>DBRef is neither a variable nor a database reference.
</DL>
<H2>Examples</H2>
<PRE>
   [eclipse]: recordz(beer, paulaner, Ref), referenced_record(Ref, X).
   Ref = 'DBREF'(16'50470d00)
   X = paulaner
   yes.

   [eclipse]: recorded(beer, _, Ref), referenced_record(Ref, X).
   Ref = 'DBREF'(16'50470d00)
   X = paulaner     More? (;)
   yes.

   [eclipse]: recorded(beer, _, Ref), erase(Ref), referenced_record(Ref, X).
   Ref = 'DBREF'(16'50470d00)
   X = paulaner     More? (;)
   yes.

Error:
   referenced_record(_, Value).         (Error 4)
   referenced_record(123, Value).       (Error 5)



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/record/recorda-3.html">recorda / 3</A>, <A HREF="../../kernel/record/recordz-3.html">recordz / 3</A>, <A HREF="../../kernel/record/recorded-3.html">recorded / 3</A>, <A HREF="../../kernel/record/erase-1.html">erase / 1</A>, <A HREF="../../kernel/record/referenced_record-2.html">referenced_record / 2</A>
</BODY></HTML>
